<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	
	<xs:element name="configuration">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="name" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

	<xs:element name="name">
		<xs:complexType>
			<xs:choice>
				<xs:element ref="add" maxOccurs="unbounded"/>
				<xs:sequence>
					<xs:element ref="aspnet" minOccurs="0"/>
					<xs:element ref="java" minOccurs="0"/>
					<xs:element ref="overrides" minOccurs="0"/>
					<xs:element ref="exceptions" minOccurs="0"/>
				</xs:sequence>
			</xs:choice>
			<xs:attribute name="id" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="(app|application|db|domain|wcf)[#][0-9]*|http"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="active" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="y"/>
						<xs:enumeration value="n"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="add">
		<xs:complexType>
			<xs:attribute name="key" type="xs:string"/>
			<xs:attribute name="value" type="xs:string" use="required"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="aspnet">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="add" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="appref" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string"/>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="java">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="add"/>
			</xs:sequence>
			<xs:attribute name="appref" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string"/>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="overrides">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="add" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="exceptions">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="add" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	
</xs:schema>
